from views import *
from views.auth import verify_token, verify_api_key
from views.share import share_router

# v1版本，验证token，web专用
api_router_v1 = APIRouter()
api_router_v1.include_router(share_router,prefix="/share", tags=['Share'])
api_router_v1.include_router(login_router, prefix="/user", tags=['User'], )

api_router_v1.include_router(ws, prefix="/toolkit", tags=['Toolkit'])
api_router_v1.include_router(dashboard_router, prefix="/dashboard", tags=['Dashboard'],
                             dependencies=[Depends(verify_token)])
api_router_v1.include_router(cmdb_router, prefix="/cmdb", tags=['CMDB'], dependencies=[Depends(verify_token)])
api_router_v1.include_router(toolkit_router, prefix="/toolkit", tags=['Toolkit'], dependencies=[Depends(verify_token)])
api_router_v1.include_router(file_manager_router, prefix="/file-manager", tags=['Filemanager'],
                             dependencies=[Depends(verify_token)])
api_router_v1.include_router(system_router, prefix="/system", tags=['System'], dependencies=[Depends(verify_token)])
api_router_v1.include_router(scheduler_router, prefix="/scheduler", tags=['Scheduler'],
                             dependencies=[Depends(verify_token)])

# api_router_v1.include_router(service_router, prefix="/service", tags=['Service'],
#                              dependencies=[Depends(verify_token)])

# v2版本，验证apikey，脚本专用
api_router_v2 = APIRouter()
api_router_v2.include_router(cmdb_router, prefix="/cmdb", tags=['CMDB'], dependencies=[Depends(verify_api_key)])
api_router_v2.include_router(toolkit_router, prefix="/toolkit", tags=['Toolkit'], dependencies=[Depends(verify_api_key)])
